home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS03.ADF / AmigaBasicProgs / superterm < prev    next >
Text File  |  1986-03-17  |  16KB  |  797 lines

  1.  
  2.  
  3. REM - Superterm V1.0 by Kelly Kauffman
  4. REM - January 3, 1985
  5. REM
  6. '
  7. '
  8. '
  9. '
  10. PRINT "Do you want CTRL-C's to end the program (E) or actually send a CTRL-C"
  11. PRINT "through the modem (S)   Input Choice (Either E or S)";
  12. INPUT choice$
  13. IF choice$="S" OR choice$="s" THEN
  14.    BREAK ON
  15.    ON BREAK GOSUB breaker
  16. END IF
  17. DIM mac$(10)
  18. DIM bf$(256)
  19. GOSUB gettem
  20. WIDTH 77
  21. rcp(1)=1
  22. fl(1)=1
  23. fl(2)=1
  24. cp(2)=1
  25. DIM bd(12)
  26. F$="COM1:"
  27. menusel=3
  28. GOSUB baud
  29. menusel=1
  30. GOSUB trm
  31. menusel=3
  32. GOSUB trm
  33. menusel=6
  34. GOSUB trm
  35. menusel=4
  36. GOSUB decipher
  37. menusel=9  :'databits
  38. GOSUB decipher
  39. menusel=11  :'stopbits
  40. GOSUB decipher
  41. GOSUB initterm
  42. GOSUB initmenu
  43. MENU ON
  44. ON MENU GOSUB menustuff
  45.  
  46. term:
  47.  
  48.     
  49.     ON ERROR GOTO oops
  50.     PRINT "  ----====>>>> Terminal Mode <<<<====----"
  51.     MENU ON
  52.     
  53.     
  54. 20  
  55.   
  56.     IF LOC(2)=1 THEN
  57.        IF LOC(2)=1 THEN in$=INPUT$(1,2)
  58.        IF ASC(in$)=13 AND lf=1 THEN PRINT
  59.        PRINT in$;
  60.        IF cap=1 THEN
  61.              buff$=buff$+in$
  62.              IF lf=1 THEN buff$=buff$+CHR$(10)
  63.        END IF    
  64.     END IF      
  65.     b$=INKEY$
  66.        IF b$<>"" THEN
  67.            IF ASC(b$)>128 AND ASC(b$)<139 THEN GOTO macro
  68.            PRINT #2,b$;
  69.            IF dp=1 THEN PRINT b$;
  70.        END IF        
  71.     GOTO 20
  72.  
  73. cap:
  74.    
  75.    PRINT "Capture ";
  76.        IF cap=1 THEN
  77.           PRINT "ON"
  78.           PALETTE 0,.78,.05,.05 
  79.        ELSE
  80.           PRINT "OFF"
  81.           PALETTE 0,.05,.05,.78
  82.        END IF
  83.    RETURN
  84.                                                             
  85. linfd:
  86.    
  87.    PRINT "Linefeeds ";
  88.        IF lf=1 THEN PRINT "ON" ELSE PRINT "OFF"
  89.    RETURN
  90.    
  91. sav:
  92.    
  93.    PRINT 
  94.    PRINT
  95.    PRINT "Save Buffer to what filename ";
  96.    INPUT file$
  97.    CLOSE 5
  98.    OPEN file$ FOR OUTPUT AS 5
  99.    PRINT #5,buff$;
  100.    CLOSE 5
  101.    RETURN
  102.          
  103.    
  104. lod:
  105.  
  106.    PRINT "Load Buffer"
  107.    PRINT
  108.    PRINT
  109.    PRINT "What filename to load";
  110.    INPUT file$
  111.    CLOSE 5
  112.    OPEN file$ FOR INPUT AS #5
  113.    PRINT
  114.    PRINT "Length of File = ";LOF(5)
  115.    buff$=INPUT$(LOF(5),5)
  116.    PRINT
  117.    PRINT "Buffer Load Completed."   
  118.    PRINT
  119.    RETURN
  120.  
  121. initmenu:
  122.  
  123.    MENU 1,0,1,"Misc. "
  124.    MENU 1,1,1,"Save Buffer   "
  125.    MENU 1,2,1,"Load Buffer   "
  126.    MENU 1,3,1,"Edit Macros   "
  127.    MENU 1,4,1,"Review Buffer "
  128.    MENU 1,5,1,"Show Info     "
  129.    MENU 1,6,1,"Clear Buffer  "
  130.    MENU 1,7,1,"Disk Directory"
  131.    MENU 1,8,1,"Default Direct"
  132.    MENU 1,9,1,"Delete File   "
  133.    MENU 1,10,1,"Rename File   "
  134.    MENU 1,11,1,"Print Free Mem"
  135.    MENU 2,0,1,"Term Options"
  136.    MENU 2,1,cp(1),"   Capture Off"       
  137.    MENU 2,2,cp(2),"   Capture On "
  138. ATDT1
  139.    MENU 2,3,fl(1),"   LF Sim. Off"
  140.    MENU 2,4,fl(2),"   LF Sim. On "
  141.    MENU 2,5,dp(1),"   Half Duplex"
  142.    MENU 2,6,dp(2),"   Full Duplex"
  143.    MENU 3,0,1,"Transmit"
  144.    MENU 3,1,1,"Normal Upload "
  145.    MENU 3,2,1,"Prompt Upload "
  146.    MENU 3,3,1,"Xmodem Receive"
  147.    MENU 3,4,1,"Xmodem Send   "
  148.    MENU 4,0,1,"Baud Rate"
  149.    MENU 4,1,bd(1),"    110  "
  150.    MENU 4,2,bd(2),"    150  "
  151.    MENU 4,3,bd(3),"    300  "
  152.    MENU 4,4,bd(4),"    600  " 
  153.    MENU 4,5,bd(5),"   1200  "
  154.    MENU 4,6,bd(6),"   1800  "
  155.    MENU 4,7,bd(7),"   2400  "
  156.    MENU 4,8,bd(8),"   3600  "
  157.    MENU 4,9,bd(9),"   4800  "
  158.    MENU 4,10,bd(10),"   7200  "
  159.    MENU 4,11,bd(11),"   9600  "
  160.    MENU 4,12,bd(12),"  19200  "
  161.    MENU 5,0,1,"Config"
  162.    MENU 5,1,0,"Parity"
  163.    MENU 5,2,par(1),"   Odd   "
  164.    MENU 5,3,par(2),"   Even  "
  165.    MENU 5,4,par(3),"   None  "
  166.    MENU 5,5,0,"Data-Bits"
  167.    MENU 5,6,db(1),"   5     "
  168.    MENU 5,7,db(2),"   6     "
  169.    MENU 5,8,db(3),"  \     "
  170.    MENU 5,9,db(4),"   8     "
  171.    MENU 5,10,0,"Stop-Bits"
  172.    MENU 5,11,sb(1),"   1     "
  173.    MENU 5,12,sb(2),"   2     "
  174.    RETURN
  175.    
  176. file:
  177.  
  178.    ON menusel GOSUB sav,lod,ed,review,info,clearbuf,direct,chdf,killer,ren,mem
  179.    GOTO term
  180.       
  181. trm:
  182.  
  183.    IF menusel=1 THEN cp(1)=2:cp(2)=1
  184.    IF menusel=2 THEN cp(2)=2:cp(1)=1
  185.    IF menusel=3 THEN fl(1)=2:fl(2)=1
  186.    IF menusel=4 THEN fl(2)=2:fl(1)=1
  187.    IF menusel=5 THEN dp(1)=2:dp(2)=1
  188.    IF menusel=6 THEN dp(2)=2:dp(1)=1
  189.    IF first=1 THEN 
  190.           MENU 2,0,1,"Term Options"
  191.           MENU 2,1,cp(1),"   Capture Off"
  192.           MENU 2,2,cp(2),"   Capture On "
  193.           MENU 2,3,fl(1),"   LF Sim. Off"
  194.           MENU 2,4,fl(2),"   LF Sim. On "
  195.           MENU 2,5,dp(1),"   Half Duplex"
  196.           MENU 2,6,dp(2),"   Full Duplex"
  197.    END IF
  198.    IF first=1 THEN 
  199.       IF menusel=1 THEN cap=0:GOTO cap
  200.       IF menusel=2 THEN cap=1:GOTO cap
  201.       IF menusel=3 THEN lf=0:GOTO linfd
  202.       IF menusel=4 THEN lf=1:GOTO linfd
  203.       IF menusel=5 THEN dp=1:GOTO duplex
  204.       IF menusel=6 THEN dp=0:GOTO duplex
  205.    END IF
  206.    RETURN        
  207.        
  208. baud:
  209.  
  210.    GOSUB clearbaud
  211.    ON menusel GOSUB
  212. bd110,bd150,bd300,bd600,bd1200,bd1800,bd2400,bd3600,bd4800,bd7200,bd9600,bd19200
  213.    IF first=1 THEN
  214.           MENU 4,0,1,"Baud Rate"
  215.           MENU 4,1,bd(1),"    110  "
  216.           MENU 4,2,bd(2),"    150  "
  217.           MENU 4,3,bd(3),"    300  "
  218.           MENU 4,4,bd(4),"    600  "
  219.           MENU 4,5,bd(5),"   1200  "
  220.           MENU 4,6,bd(6),"   1800  "
  221.           MENU 4,7,bd(7),"   2400  "
  222.           MENU 4,8,bd(8),"   3600  "
  223.           MENU 4,9,bd(9),"   4800  "
  224.           MENU 4,10,bd(10),"   7200  "
  225.           MENU 4,11,bd(11),"   9600  "  
  226.           MENU 4,12,bd(12),"  19200  "
  227.    END IF
  228.    IF first=1 THEN GOSUB initterm ELSE RETURN
  229.    RETURN
  230.    
  231.    
  232. bd110:
  233.  
  234.    baud$="110"
  235.    bd(1)=2
  236.    RETURN
  237.        
  238. bd150:
  239.  
  240.    baud$="150"
  241.    bd(2)=2
  242.    RETURN
  243.    
  244. bd300:
  245.  
  246.    baud$="300"
  247.    bd(3)=2
  248.    RETURN
  249.    
  250. bd600:
  251.  
  252.    baud$="600"
  253.    bd(4)=2
  254.    RETURN
  255.    
  256. bd1200:
  257.  
  258.    baud$="1200"
  259.    bd(5)=2
  260.    RETURN
  261.    
  262. bd1800:
  263.  
  264.    baud$="1800"
  265.    bd(6)=2
  266.    RETURN
  267.    
  268. bd2400:
  269.  
  270.    baud$="2400"
  271.    bd(7)=2
  272.    RETURN
  273.    
  274. bd3600:
  275.  
  276.    baud$="3600"
  277.    bd(8)=2
  278.    RETURN
  279.    
  280. bd4800:
  281.  
  282.    baud$="4800"
  283.    bd(9)=2
  284.    RETURN
  285.    
  286. bd7200:
  287.  
  288.    baud$="7200"
  289.    bd(10)=2
  290.    RETURN
  291.    
  292. bd9600:
  293.  
  294.    baud$="9600"
  295.    bd(11)=2
  296.    RETURN
  297.    
  298. bd19200:
  299.  
  300.    baud$="19200"
  301.    bd(12)=2
  302.    RETURN
  303.                                      
  304. clearbaud:
  305.  
  306.     FOR i=1 TO 12
  307.        bd(i)=1
  308.     NEXT i
  309.     RETURN
  310.  
  311. initterm:
  312.  
  313.     com$=F$
  314.     comma$=","
  315.     com$=com$+baud$
  316.     com$=com$+comma$
  317.     com$=com$+parity$
  318.     com$=com$+comma$
  319.     com$=com$+databit$
  320.     com$=com$+comma$
  321.     com$=com$+stopbits$
  322.     first=1
  323.     ON ERROR GOTO oops
  324.     CLOSE 2
  325.     OPEN com$ AS #2 LEN=128
  326.     CLS
  327.     PRINT "RS232 configured to: ";
  328.     PRINT baud$;" Baud - ";
  329.     IF parity$="N" THEN PRINT "No Parity";
  330.     IF parity$="E" THEN PRINT "Even Parity";
  331.     IF parity$="O" THEN PRINT "Odd Parity";
  332.     PRINT " - ";
  333.     PRINT " ";databit$;" Databits - ";
  334.     PRINT stopbits$;" Stopbit(s)."
  335.     PRINT
  336.     RETURN
  337.  
  338. parity:
  339.  
  340.     par(1)=1
  341.     par(2)=1                               
  342.     par(3)=1
  343.     par(menusel)=2
  344.     IF menusel=1 THEN parity$="O"
  345.     IF menusel=2 THEN parity$="E"
  346.     IF menusel=3 THEN parity$="N"
  347.     IF first=1 THEN GOSUB initconfig
  348.     IF first=1 THEN GOSUB initterm
  349.     RETURN
  350.     
  351. databits:
  352.  
  353.     db(1)=1
  354.     db(2)=1
  355.     db(3)=1
  356.     db(4)=1
  357.     db(menusel)=2
  358.     IF menusel=1 THEN databit$="5"
  359.     IF menusel=2 THEN databit$="6"
  360.     IF menusel=3 THEN databit$="7"
  361.     IF menusel=4 THEN databit$="8"
  362.     IF first=1 THEN GOSUB initconfig
  363.     IF first=1 THEN GOSUB initterm
  364.     RETURN
  365.     
  366. stopbits:
  367.  
  368.     sb(1)=1
  369.     sb(2)=1
  370.     sb(menusel)=2
  371.     IF menusel=1 THEN stopbits$="1"
  372.     IF menusel=2 THEN stopbits$="2"
  373.     IF first=1 THEN GOSUB initconfig:GOSUB initterm
  374.     RETURN
  375.     
  376. menustuff:
  377.  
  378.      menuid=MENU(0)
  379.      menusel=MENU(1)
  380.      ON menuid GOSUB file,trm,trans,baud,decipher
  381.      MENU ON       
  382.      RETURN
  383.  
  384. oops:
  385.     
  386.      CLOSE #5
  387.      BEEP
  388.      IF ERR=64 THEN PRINT "           Invalid RS232 Mode!!"
  389.      IF ERR=64 THEN PRINT "           Try Other Paramaters"
  390.      IF ERR<>64 THEN PRINT "Error - ";ERR:MENU ON:RESUME term
  391.      PRINT
  392.      PRINT
  393.      MENU ON
  394. 10   IF MENU(0)<>0 THEN RESUME erormenu ELSE GOTO 10
  395.                    
  396.                    
  397. erormenu:
  398.  
  399.      menusel=MENU(1)
  400.      ON menuid GOSUB file,trm,trans,baud,decipher
  401.      MENU ON
  402.      GOTO term 
  403.      
  404. decipher:
  405.  
  406.      IF menusel<5 THEN menusel=menusel-1:GOTO parity
  407.      IF menusel<10 THEN menusel=menusel-5:GOTO databits
  408.      IF menusel<13 THEN menusel=menusel-10:GOTO stopbits
  409.  
  410. initconfig:
  411.  
  412.      MENU 5,0,1,"Config"
  413.      MENU 5,1,0,"Parity"
  414.      MENU 5,2,par(1),"   Odd   "
  415.      MENU 5,3,par(2),"   Even  "
  416.      MENU 5,4,par(3),"   None  "
  417.      MENU 5,5,0,"Data-Bits"
  418.      MENU 5,6,db(1),"   5     "
  419.      MENU 5,7,db(2),"   6     "
  420.      MENU 5,8,db(3),"   7     "
  421.      MENU 5,9,db(4),"   8     "
  422.      MENU 5,10,0,"Stop-Bits"
  423.      MENU 5,11,sb(1),"   1     "
  424.      MENU 5,12,sb(2),"   2     "
  425.      RETURN
  426.  
  427. trans:
  428.  
  429.      IF menusel=1 THEN normup
  430.      IF menusel=2 THEN prmptup
  431.      IF menusel=3 THEN xrec
  432.      IF menusel=4 THEN xsend
  433.      
  434. normup:
  435.      
  436.      ln=LEN(buff$)
  437.      FOR i=1 TO ln
  438.          PRINT #2,MID$(buff$,i,1);
  439.          IF INKEY$<>"" THEN
  440.               PRINT
  441.               PRINT
  442.               PRINT" Aborted!!!!!"
  443.               PRINT
  444.               GOTO tATDT1
  445. erm
  446.          END IF
  447.      NEXT i
  448.      PRINT
  449.      PRINT "    Normal Buffer Upload Completed."
  450.      PRINT
  451.      GOTO term
  452.      
  453. prmptup:
  454.  
  455.      ln=LEN(buff$)
  456.      FOR i=1 TO ln
  457.          PRINT #2,MID$(buff$,i,1);
  458.          IF ASC(MID$(buff$,i,1))=13 THEN GOSUB waitprompt
  459.          IF INKEY$<>"" THEN
  460.             PRINT
  461.             PRINT
  462.             PRINT "Aborted !!!"
  463.             PRINT
  464.             GOTO term
  465.          END IF
  466.       NEXT i
  467.       GOTO term
  468.       
  469. waitprompt:
  470.  
  471.     IF LOC(2)=1 THEN
  472.        qw$= INPUT$(1,2)
  473.        IF qw$<>prompt$ THEN waitprompt ELSE RETURN
  474.     END IF      
  475.  
  476. xrec:
  477.     
  478.     PRINT
  479.     PRINT "Receive what Filename";:INPUT file$
  480.     IF file$="" THEN abort
  481.     CLOSE #3
  482.     OPEN file$ FOR OUTPUT AS #3
  483.     timeout=500
  484.     ack$=CHR$(6)
  485.     nak$=CHR$(21)
  486.     eot$=CHR$(4)
  487.     blawck=1
  488.     n=1
  489.     eotflag=0
  490.     jr$=nak$:GOSUB princhr
  491. 30  bf$="":t=0:r$="":tim=0:chsum=0
  492.     FOR t=1 TO 132
  493. 50       r$=""
  494.          IF LOC(2)=1 THEN
  495.             r$=INPUT$(1,2)
  496.             bf$=bf$+r$      
  497.             tim=0
  498.             PRINT ".";
  499.          ELSE
  500.             tim=tim+1
  501.          END IF
  502.          IF t=1 THEN IF bf$=eot$ THEN 40   
  503.          IF tim>timeout THEN
  504.             PRINT "Timeout"
  505.             jr$=nak$
  506.             GOSUB princhr
  507.             t=0
  508.             tim=0
  509.             GOTO 30
  510.          END IF   
  511.          IF r$="" THEN 50     
  512.     NEXT t
  513.     chsum=0
  514.     GOSUB checksummer
  515.     IF chsum=ASC(RIGHT$(bf$,1)) THEN
  516.        PRINT #3,MID$(bf$,4,127);
  517.        PRINT "  Received Block ";blawck
  518.        jr$=ack$:GOSUB princhr
  519.        PRINT
  520.        blawck=blawck+1
  521.        GOTO 30
  522.     ELSE 
  523.        BEEP
  524.        PRINT "Checksum Error in Block ";blawck
  525.        PRINT "I get ";chsum;
  526.        PRINT ".  And He get's ";ASC(RIGHT$(bf$,1))
  527.        jd$=ack$:GOSUB princhr
  528.        PRINT  
  529.    END IF
  530.     GOTO 30
  531.      
  532. 40  CLOSE #3
  533.     PRINT #2,ack$;
  534.     PRINT "File Transfer is Completed."
  535.     GOTO term
  536.  
  537. checksum:
  538.    
  539.     chsum=0
  540.     FOR i=1 TO 128
  541.         chsum=chsum+ASC(MID$(bf$,i,1)) AND 255
  542.     NEXT i
  543.     RETURN
  544.         
  545. xsend:
  546.  
  547.     PRINT
  548.     PRINT"Send what filename";
  549.     INPUT file$
  550.     IF file$="" THEN abort
  551.     ack$=CHR$(6)
  552.     block=0
  553.     nak$=CHR$(21)
  554.     eot$=CHR$(4)
  555.     CLOSE 3
  556.     OPEN file$ FOR INPUT AS #3
  557.     ln=LOF(3)
  558.     PRINT "Length of File ";ln;".  ";
  559.     n=ln/128
  560.     IF INT(n) < n THEN n=INT(n)+1 ELSE n=INT(n)
  561.     PRINT n;" Blocks."
  562.     bf$=""
  563. 80  GOSUB waitchar
  564.     IF char$<>nak$ THEN 80
  565. 75  IF ln>127 THEN bf$=INPUT$(128,3) ELSE GOSUB getrest
  566.     ln=ln-128
  567.     block=block+1
  568. 90  PRINT "      Sending Block";block
  569.     GOSUB stuff
  570.     PRINT #2,bf$;
  571.     GOSUB checksum
  572.     PRINT #2,CHR$(chsum);
  573.     GOSUB waitchar
  574.     IF char$=nak$ THEN BEEP:PRINT "Checksum Error in block";block:GOTO 90
  575.     IF char$=ack$ AND ed=0 THEN 75
  576.     IF char$=ack$ AND ed=1 THEN PRINT #2,eot$
  577.     IF char$<>nak$ AND char$<>ack$ THEN PRINT "Connection Aborts Transfer":PRINT
  578. :GOTO term
  579.     ed=0
  580.     PRINT "File Transfer Complete."
  581.     GOTO term
  582.     
  583. waitchar:
  584.   
  585.       IF LOC(2)=1 THEN 
  586.         IF LOC(2)=1 THEN char$=INPUT$(1,2)
  587.         RETURN
  588.       END IF
  589.       GOTO waitchar
  590.             
  591. getrest:
  592.   
  593.      bf$=""
  594.      bf$=INPUT$(ln,3)
  595.      FOR i=ln+1 TO 128
  596.         bf$=bf$+" "
  597.      NEXT i
  598.      ed=1
  599.      RETURN
  600.  
  601. stuff:
  602.  
  603.      PRINT #2,CHR$(1);
  604.      PRINT #2,CHR$(block AND 255);
  605.      PRINT #2,CHR$((block AND 255)XOR 255);
  606.      RETURN
  607.      
  608. checksummer:
  609.    
  610.     chsum=0
  611.     FOR i=1 TO 131
  612.         chsum=chsum+ASC(MID$(bf$,i,1)) AND 255
  613.     NEXT i
  614.     RETURN
  615.  
  616. duplex:
  617.  
  618.     IF dp=1 THEN PRINT :PRINT "Half Duplex"
  619.     IF dp=0 THEN PRINT :PRINT "Full Duplex"
  620.     RETURN
  621.  
  622. ed:
  623.     
  624.     CLS
  625.     PRINT
  626.     PRINT
  627.     PRINT "       Current Macro's"
  628.     FOR i=1 TO 10
  629.     PRINT "F";i;":=";mac$(i)
  630.     NEXT i
  631.     PRINT
  632.     INPUT "Edit Which Macro (0 to Exit)",which
  633.     IF which=0 AND change=1 THEN dump
  634.     IF which=0 AND change=0 THEN term
  635.     PRINT
  636.     PRINT "Input New Macro to be used for key F";STR$(which);"."
  637.     LINE INPUT mac$(which)
  638.     IF mac$(which)="" THEN mac$(which)="Undefined"
  639.     change=1
  640.     GOTO ed
  641.  
  642. dump:
  643.   
  644.     CLOSE 3
  645.     OPEN "Macro" FOR OUTPUT AS #3
  646.     FOR i=1 TO 10
  647.     PRINT #3,mac$(i)
  648.     NEXT i
  649.     CLOSE 3
  650.     change=0
  651.     GOTO term
  652.  
  653. gettem:
  654.  
  655.     ON ERROR GOTO macerr
  656.     CLOSE #3
  657.     OPEN "Macro" FOR INPUT AS #3
  658.     FOR i=1 TO 10
  659.     LINE INPUT #3,mac$(i)
  660.     NEXT i       
  661.     CLOSE 3
  662.     RETURN
  663.     
  664. macerr:
  665.  
  666.     IF ERR=53 THEN 
  667.        CLOSE 3
  668.        OPEN "Macro" FOR OUTPUT AS #3
  669.            FOR i=1 TO 10
  670.            PRINT #3,"Undefined"
  671.            NEXT i
  672.        CLOSE 3
  673.     END IF
  674.     MENU ON
  675.     RESUME gettem 
  676.     
  677. macro:
  678.  
  679.     g=ASC(b$)
  680.     g=g-128
  681.     IF mac$(g)="Undefined" THEN y=1 ELSE y=0
  682.     hy=INSTR(mac$(g),"[RET]")
  683.     IF hy=0 AND y=0 THEN PRINT #2,mac$(g);
  684.     IF hy=0 AND dp=1 AND y=0 THEN PRINT mac$(g);
  685.     IF hy<>0 AND y=0 THEN PRINT #2,MID$(mac$(g),1,hy-1)
  686.     IF hy<>0 AND dp=1 AND y=0 THEN PRINT #2,MID$(mac$(g),1,hy-1)
  687.     GOTO 20
  688.  
  689. review:
  690.  
  691.     FOR i=1 TO LEN(buff$) STEP 4
  692.     PRINT MID$(buff$,i,4);
  693.     IF INKEY$<>"" THEN RETURN
  694.     NEXT i
  695.     RETURN
  696.     
  697. info:
  698.     
  699.     WINDOW 5,,(70,50)-(540,140),0,-1
  700.     PRINT "                       Info"
  701.     PRINT 
  702.     PRINT " SuperTerm V1.0 was written by Kelly Kauffman to be used"
  703.     PRINT "EXCLUSIVELY on the Amiga.  The Program was written in "
  704.     PRINT "Microsoft Basic, and requires an Amiga with 512K."
  705.     PRINT 
  706.     PRINT "         Program & Audio-Visual Copyright 1986"
  707.     PRINT "                   Kelly Kauffman"
  708.     PRINT 
  709.     PRINT "This program may not be sold for ANY PRICE without consent"
  710.     PRINT "of the author.  Please feel free, however, to distribute"
  711.     INPUT "free copies of this program.  Press [RETURN] ";a$   
  712.     WINDOW CLOSE (5)
  713.     WINDOW (1)
  714.     WINDOW OUTPUT (1)
  715.     RETURN    
  716.  
  717. clearbuf:
  718.  
  719.     buff$=""
  720.     bf$=""
  721.     PRINT 
  722.     PRINT  "Buffer Cleared"
  723.     PRINT 
  724.     RETURN
  725.  
  726. princhr:
  727.  
  728.     CLOSE #2
  729.     OPEN com$ AS #2 LEN=1000
  730.     FOR uip=1 TO 200:NEXT uip
  731.     PRINT #2,jr$;
  732.     RETURN
  733.  
  734. direct:
  735.  
  736.      PRINT 
  737.      PRINT "Directory Pathname [Or Press Return to use Default Pathname]"
  738.      INPUT path$
  739.      PRINT 
  740.      FILES path$
  741.      RETURN
  742.  
  743. chdf:
  744.  
  745.      PRINT
  746.      PRINT "Enter pathname to be used as the Default Directory"
  747.      INPUT ty$
  748.      CHDIR ty$
  749.      PRINT
  750.      RETURN
  751.      
  752. killer:
  753.  
  754.      PRINT
  755.      PRINT "Enter Filename to delete";
  756.      INPUT ty$
  757.      PRINT "Are you Sure (y/n)ATDT1
  758. ";
  759.      INPUT yn$
  760.      IF yn$<>"Y" AND yn$<>"y" THEN
  761.         PRINT "File --==>>NOT<<==-- Deleted"
  762.         RETURN
  763.      ELSE
  764.         KILL ty$
  765.      END IF
  766.      PRINT ty$;" is gone!!!"
  767.      PRINT
  768.      RETURN
  769.      
  770. ren:
  771.  
  772.      PRINT 
  773.      PRINT "Rename:"
  774.      PRINT "Input OLD filename to rename";
  775.      INPUT oldfil$
  776.      PRINT
  777.      PRINT "Input NEW name for the file";
  778.      INPUT newfil$
  779.      NAME oldfil$ AS newfil$
  780.      PRINT
  781.      PRINT oldfil$;" is now called ";newfil$;"."
  782.      PRINT 
  783.      RETURN
  784.  
  785. breaker:
  786.  
  787.      PRINT #2,CHR$(3);
  788.      RETURN
  789.  
  790. mem:
  791.  
  792.      PRINT 
  793.      PRINT FRE(-1);" Bytes of Memory Remain."
  794.      PRINT 
  795.      RETURN
  796.  
  797.